home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
T-TPUG Old Monthly Disks
/
(c)t8.d64
/
shuffle.c
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
2KB
|
78 lines
99 REM VIC VERSION BY
100 REM (C) PET BENELUX
110 REM EXCHANGE
120 REM NETHERLANDS
121 REM**TRANSLATED FROM THE DUTCH, UPGRADED & REVISED BY ROGER D BURGE
122 REM**ADAPTED TO THE COMMODORE 64 BY ROGER D BURGE, #2667
123 REM*TORONTO PET USERS GROUP, CANADA
130 GOSUB610
140 PO$=""
150 DIMA(16),B(16):TB=0:POKE53280,1:POKE53281,1
160 PRINT"[147][144] SHUFFLE "
161 PRINT""TAB(TB)"[176][192][192][192][192][178][192][192][192][192][178][192][192][192][192][178][192][192][192][192][174]"
170 FORI=1TO4:FORJ=1TO3:PRINTTAB(TB);"[144][221] [144][221] [144][221] [144][221] [144][221]":NEXTJ
180 IFI<4THENPRINTTAB(TB);"[144][171][192][192][192][192][219][192][192][192][192][219][192][192][192][192][219][192][192][192][192][179]"
190 NEXTI:PRINTTAB(TB);"[144][173][192][192][192][192][177][192][192][192][192][177][192][192][192][192][177][192][192][192][192][189]"
195 PRINT"^ = RESTART/ _ = QUIT"
200 PRINT"[144] I[157][157]J[146][209]K[157][157]M
210 [129]I[178]1[164]16:A(I)[178]I:[130]I
220 [129]I[178]15[164]2[169][171]1:J[178][187](1)[172]I[170]1:T[178]A(J):A(J)[178]A(I):A(I)[178]T:[130]I
230 [129]I[178]1[164]16:B(I)[178]A(I):[139]B(I)[178]16[167]BS[178]I
240 [130]I
250 C[178]0:[129]I[178]1[164]16
260 [139]A(I)[179][177]I[167]T[178]A(I):A(I)[178]A(T):A(T)[178]T:C[178]C[170]1:[137]260
270 [130]I
280 [139](C[175]1)[178]0[167]320
290 I[178][181]([187](1)[172]16)[170]1:[139]B(I)[178]16[167]290
300 J[178][181]([187](1)[172]16)[170]1:[139]B(J)[178]16[176]I[178]J[167]290
310 T[178]B(I):B(I)[178]B(J):B(J)[178]T
320 [153]"":[153]"";
330 [129]I[178]1[164]16[169]4:[129]J[178]0[164]3:[153][163]TB[170]J[172]5[170]2);
340 [139]B(I[170]J)[179]16[167][153]""[201]([196](B(I[170]J)),2);
350 [130]J:N[178]0:[153]"":[130]I:[153][200](PO$,22);N;"TURNS"
360 [161]Z$:[139]Z$[178]""[167]360
370 [139]Z$[178]"^"[167][138]
375 [139]Z$[178]"_"[167][153]"LOAD":[128]
380 [139]Z$[178]"I"[167]Z$[178]"8"
381 [139]Z$[178]"M"[167]Z$[178]"2"
382 [139]Z$[178]"J"[167]Z$[178]"4"
383 [139]Z$[178]"K"[167]Z$[178]"6"
390 [139][197](Z$)[175]1[167]360
400 [145][197](Z$)[173]2[137]470,450,430,410
410 T[178]BS[170]4:[139]T[177]16[167]360
420 [137]480
430 T[178]BS[171]1:[139](3[175]T)[178]0[167]360
440 [137]480
450 T[178]BS[170]1:[139](3[175]BS)[178]0[167]360
460 [137]480
470 T[178]BS[171]4:[139]T[179]1[167]360
480 B(BS)[178]B(T):B(T)[178]16
490 I[178][181]((BS[171]1)[173]4):J[178]BS[171]I[172]4
500 [153]""[200](PO$,I[172]4[170]5):[153]"ON"[163]TB[170]J[172]5[171]3)[201]([196](B(BS)),2)
510 I[178][181]((T[171]1)[173]4):J[178]T[171]I[172]4
520 [153]""[200](PO$,I[172]4[170]5):[153]"ON"[163]TB[170]J[172]5[171]3)" "
530 BS[178]T:N[178]N[170]1:[153]""[200](PO$,22);[196](N);" TURN";:[139]N[177]1[167][153]"S
540 PRINT" ":IFBS<16THEN360
550 FORI=1TO16:IFB(I)<>ITHEN360
560 NEXTI:PRINT"[147]"LEFT$(PO$,20);"YOU FINISHED IN":PRINT""N"[146]TURNS"
570 PRINT"PLAY AGAIN?";
580 GETI$:IFI$=""THEN580
590 IFI$="Y"THENRUN
595 IFI$="N"THEN1000
600 GOTO580
610 POKE53280,10:POKE53281,2:PRINTCHR$(14)
620 PRINT"[147] [211][200][213][198][198][204][197]! "
630 PRINT"[212]RY TO REARRANGE THE ";
640 PRINT"NUMBERS IN PROPER ORDER";
650 PRINT" USING THE [201], [202], [203] AND [205] KEYS.
660 [153]" (null)OU CAN MOVE A NUMBER ";
670 [153]"FROM ITS POSITIONTO ANOTHER";
680 [153]" ONLY IF THE NEXT SPACE IS EMPTY.
690 PRINT" [208]RESS THE ^[146] KEY TO START OVER
700 [153]" (null)RESS THE _WAIT TO QUIT
710 PRINT" [199][207][207][196][160][204][213][195][203]!
720 [153]" (null)RESS ANY KEY TO START "
780 [161]A$:[139]A$[178]""[167]780
790 [153]"LOAD":[153][199](142):[142]
999 [151]53281,1:[151]53280,1